# 线路表

# 实现表crud查询
from sql.models import Xlb
from sqlalchemy.sql.expression import true
from sqlalchemy.sql.functions import user
from sql.database import db_session
from sqlalchemy import or_,and_

def get_user(xlbh:str):
  db = db_session()
  res = db.query(Xlb).filter(Xlb.xlbh == xlbh).first()
  db.close()
  res = res.__dict__ if res else None   # 将Yhb对象转化为dictleixing 
  return res
